package com.atguigu.gulimall;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 整合Mybatisplus
 * 1.场景启动器
 * <!--        mybatis-plus dap层技术-->
 *         <dependency>
 *             <groupId>com.baomidou</groupId>
 *             <artifactId>mybatis-plus-boot-starter</artifactId>
 *             <version>3.2.0</version>
 *         </dependency>
 *
 * 2.配置
 *  1).配置数据源
 *      导入数据库的驱动
 *  2)配置Mybatis-plus
 *      1.在application.yml配置数据源相关信息
 *      2.mybatisplus配置 1.使用MapperScan
 *      2.sql映射文件位置
 *      3.主键自增
 *
 * 3.逻辑删除:配置全局的逻辑删除规则
 * 2):呸之逻辑删除的组件，3.1.1后不需要配置逻辑删除组件Bean
 * 3)给实体类字段上加注解 加上TableLogic
 * 实时刷新页面，不重启服务器 1）引入springboot dev tools
 * 4.整合redisson作为分布式锁等功能框架
 * 1)引入依赖
 * 2)配置
 */

@EnableFeignClients(basePackages = "com.atguigu.gulimall.product.feign")
@EnableDiscoveryClient
@SpringBootApplication
@MapperScan("com.atguigu.gulimall.product.dao")
@EnableRedisHttpSession
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
